package com.aiyige.page.test;

import com.aiyige.page.test.callback.STBCallback;

public class STBManager {

    private static STBManager instance;

    public static STBManager getInstance() {
        if (instance == null) {
            instance = new STBManager();
        }
        return instance;
    }

    STBCallback callback;

    public PresenterCallback getPresenterCallback() {
        return presenterCallback;
    }

    public void setPresenterCallback(PresenterCallback presenterCallback) {
        this.presenterCallback = presenterCallback;
    }

    PresenterCallback presenterCallback;

    public STBCallback getCallback() {
        return callback;
    }

    public void setCallback(STBCallback callback) {
        this.callback = callback;
    }

    public void doPresenterPause() {
        if (getPresenterCallback() != null) {
            getPresenterCallback().doPresenterPause();
        }
    }

    public void doPresenterChangedPlayList() {
        if (getPresenterCallback() != null) {
            getPresenterCallback().doPresenterChangedPlayList();
        }
    }


    public interface PresenterCallback{
        void doPresenterPause();

        void doPresenterChangedPlayList();
    }

}
